Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add insertion op; improve deletion op; add new way to simplify constants #1

Merged
merged 13 commits into from
Sep 19, 2020

Conversation

MilesCranmer
Copy link
Owner

Insertion op:

  • Insert random operator inside an equation at a random node, rather than just at a leaf. Binary trees will add a new constant/variable on one of their branches.

Deletion op:

  • Now when deleting an operator from the middle of an equation, it will leave the enclosed operations, rather than replacing them with a constant/variable.

Simplification op:

  • ((x0 + const) + const)=>(x0+const), and ((x0 * const) * const) => (x0 * const) after initially simplifying all constant parts of an equation, like (const ... const) => (const). This seems to help a lot with the new insertion op, which seemed to result in many constants being added together.

Hyperparams:

  • These have been set to hand-chosen values until a new hyperparameter optimization is run.

@MilesCranmer
Copy link
Owner Author

E.g.,

julia> printTree(n)
plus(plus(x0, 1.0), 2.0)
julia> printTree(insertRandomOp(copyNode(n)))
div(plus(plus(x0, 1.0), 2.0), 1.2341375)
julia> printTree(combineOperators(copyNode(n)))
plus(x0, 3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant